package com.zgc.controller;

import com.zgc.common.R;
import com.zgc.util.GaodeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/map")
public class GaodeController {
    @Autowired
    private GaodeUtils gaodeUtils;
    @GetMapping
    public R<Map> getRestult(@RequestParam("zb") String zb){
        Map<String ,String> map= gaodeUtils.getDistanceAndTime(zb);
        return R.success(map);
    }
}